{extend name="base" /}
{block name="content"}
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>系统</span>
            <span class="icon-angle-right"></span>
            <span>系统设置</span>
            <span class="icon-angle-right"></span>
            <span>系统设置</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <div class="m-tab-tit clearfix">
                <ul>
                    <li><a href="javascript:;">用户设置</a></li>
                    <li><a href="javascript:;">附件设置</a></li>
                    <li><a href="javascript:;" style="display: none">积分设置</a></li>
                    <li><a href="javascript:;" style="display: none">抵用券设置</a></li>
                    <li><a href="javascript:;" style="display: none">股东设置</a></li>
                    <li><a href="javascript:;" style="display: none">分销设置</a></li>
                </ul>
            </div>
            <div class="m-form mt-10">
                <form class="layui-form" id="j_form">
                    <div class="m-tab-con">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">后台用户</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="login_nums">登录次数限制</label></td>
                                    <td><input type="text" class="u-ipt u-ipt-tiny" name="file[login_nums]" id="login_nums" value="{$file.login_nums ?: $site.default_login_nums}" /></td>
                                </tr>
                                <tr>
                                    <td><label for="login_time">重新登录时间间隔</label></td>
                                    <td><input type="text" class="u-ipt u-ipt-tiny" name="file[login_time]" id="login_time" value="{$file.login_time ?: $site.default_login_time}" /><span>分钟</span></td>
                                </tr>
                                <tr hidden>
                                    <th colspan="2">前台用户</th>
                                </tr>
                               <tr style="display: none">
                                    <td width="15%"><label>站点是否开启</label></td>
                                    <td>
                                        <input type="radio" name="db[is_web]" value="1" title="开启"{if condition=" isset($db['is_web']) && ($db['is_web'] eq 1)"} checked{/if} />
                                        <input type="radio" name="db[is_web]" value="0" title="关闭"{if condition=" isset($db['is_web']) && ($db['is_web'] eq 0)"} checked{/if} />
                                    </td>
                                </tr>

                                <tr hidden>
                                    <td width="15%"><label>是否强制关注公众号</label></td>
                                    <td>
                                        <input type="radio" name="db[is_wx_subscribe]" value="1" title="开启"{if condition=" isset($db['is_wx_subscribe']) && ($db['is_wx_subscribe'] eq 1)"} checked{/if} />
                                        <input type="radio" name="db[is_wx_subscribe]" value="0" title="关闭"{if condition=" isset($db['is_wx_subscribe']) && ($db['is_wx_subscribe'] eq 0)"} checked{/if} />
                                    </td>
                                </tr>
                                <tr hidden>
                                    <td width="15%"><label>公众号关注路径</label></td>
                                    <td>
                                        <input type="text" name="db[is_wx_url]" value="{$db.is_wx_url?: ''}" />
                                    </td>
                                </tr>

                                <tr style="display: none">
                                    <td width="15%"><label>会员注册</label></td>
                                    <td>
                                        <input type="radio" name="db[is_reg]" value="1" title="开启"{if condition="!$db || $db['is_reg'] eq 1"} checked{/if} />
                                        <input type="radio" name="db[is_reg]" value="0" title="关闭"{if condition="$db && $db['is_reg'] eq 0"} checked{/if} />
                                    </td>
                                </tr>
                                <tr hidden>
                                    <td><label>默认注册会员组</label></td>
                                    <td>
                                        <div class="lay-select">
                                            <select name="db[reg_role_id]">
                                                {foreach name="roles" item="role"}
                                                <option value="{$role.id}"{if condition="$db['reg_role_id'] eq $role['id']"} selected{/if}>{$role.name}</option>
                                                {/foreach}
                                            </select>
                                        </div>
                                    </td>
                                </tr>
                                <tr style="display: none">
                                    <td><label>投稿功能</label></td>
                                    <td>
                                        <input type="radio" name="db[is_post]" value="1" title="开启"{if condition="!$db || $db['is_post'] eq 1"} checked{/if} />
                                        <input type="radio" name="db[is_post]" value="0" title="关闭"{if condition="$db && $db['is_post'] eq 0"} checked{/if} />
                                    </td>
                                </tr>
                                <tr style="display: none">
                                    <td><label for="first_post_time">新会员投稿限制</label></td>
                                    <td><label>最新注册会员必须过</label><input type="text" name="db[first_post_time]" class="u-ipt u-ipt-tiny" id="first_post_time" value="{$db.first_post_time ?: 0}" /><span>分钟才能投稿 (0为不限制)</span></td>
                                </tr>
                                <tr style="display: none">
                                    <td><label>微信端会员注册方式</label></td>
                                    <td>
                                        <input type="radio" name="db[wechat_reg]" value="1" title="自动"{if condition="!$db || $db['wechat_reg'] eq 1"} checked{/if} />
                                        <p class="label font-13">用户首次打开微信端商城,，会自动注册为会员，本微信会员与电脑端会员是两个会员账号。<br/>好处是可以自动完成会员注册。一般应用于只在微信端运营的商家。</p>
                                        <input type="radio" name="db[wechat_reg]" value="0" title="非自动"{if condition="$db && $db['wechat_reg'] eq 0"} checked{/if} />
                                        <p class="label font-13">用户首次打开微信端商城,，不会自动注册为会员，需要进行普通会员注册或者登录会员账号与微信进行绑定，<br/>一般应用于电脑端与微信端会员账号统一管理。</p>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">附件设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><label for="attach_uri_prefix">附件地址前缀<em>*</em></label></td>
                                    <td><input type="text" name="file[attach_uri_prefix]" class="u-ipt u-ipt-def" id="attach_uri_prefix" value="{$file.attach_uri_prefix ?: '/'}" /><span>必须以/结尾</span></td>
                                </tr>
                                <tr>
                                    <td><label for="upload_image_filesize">上传图片大小</label></td>
                                    <td><input type="text" name="db[upload_image_filesize]" class="u-ipt u-ipt-tiny" id="upload_image_filesize" value="{$db.upload_image_filesize ?: $site.default_upload_image_filesize}" /><span>KB</span></td>
                                </tr>
                                <tr>
                                    <td><label for="upload_image_filetype">上传图片扩展名</label></td>
                                    <td><input type="text" name="db[upload_image_filetype]" class="u-ipt u-ipt-long" id="upload_image_filetype" value="{$db.upload_image_filetype ?: $site.default_upload_image_filetype}" /><span>(多个请用“|”格开，如：.gif|.jpg)</span></td>
                                </tr>
                                <tr>
                                    <td width="15%"><label for="upload_attach_filesize">上传附件大小</label></td>
                                    <td><input type="text" name="db[upload_attach_filesize]" class="u-ipt u-ipt-tiny" id="upload_attach_filesize" value="{$db.upload_attach_filesize ?: $site.default_upload_attach_filesize}" /><span>KB</span></td>
                                </tr>
                                <tr>
                                    <td><label for="upload_attach_filetype">上传附件扩展名</label></td>
                                    <td><input type="text" name="db[upload_attach_filetype]" class="u-ipt u-ipt-long" id="upload_attach_filetype" value="{$db.upload_attach_filetype ?: $site.default_upload_attach_filetype}" /><span>(多个请用“|”格开，如：.gif|.jpg)</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">积分设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="points_rate">积分现金比例</label></td>
                                    <td><label>1元=</label><input type="text" name="db[points_rate]" class="u-ipt u-ipt-tiny" id="points_rate" value="{$db.points_rate ?: 1}" /><span>积分</span></td>
                                </tr>
                                <tr>
                                    <td><label for="register_points">注册赠送</label></td>
                                    <td><input type="text" name="db[register_points]" class="u-ipt u-ipt-tiny" id="register_points" value="{$db.register_points ?: 0}" /><span>积分</span></td>
                                </tr>
                                <tr>
                                    <td><label for="order_points_rate">购物送积分</label></td>
                                    <td><label>利润的</label><input type="text" name="db[order_points_rate]" class="u-ipt u-ipt-tiny" id="order_points_rate" value="{$db.order_points_rate ?: 0}" /><span>%</span></td>
                                </tr>
                                <tr>
                                    <td><label for="points_buy_limit">积分支付</label></td>
                                    <td><label>商品价格超过</label><input type="text" name="db[points_buy_limit]" class="u-ipt u-ipt-tiny" id="points_buy_limit" value="{$db.points_buy_limit ?: 0}" /><span>元可以使用积分支付</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">抵用券设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="vouchers_rate">抵用券现金比例</label></td>
                                    <td><label>1元=</label><input type="text" name="db[vouchers_rate]" class="u-ipt u-ipt-tiny" id="vouchers_rate" value="{$db.vouchers_rate ?: 1}" /><span>抵用券</span></td>
                                </tr>
                                <tr>
                                    <td><label for="vouchers_buy_limit">抵用券支付</label></td>
                                    <td><label>商品价格超过</label><input type="text" name="db[vouchers_buy_limit]" class="u-ipt u-ipt-tiny" id="vouchers_buy_limit" value="{$db.vouchers_buy_limit ?: 0}" /><span>元可以使用抵用券支付</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                                <tr>
                                    <th colspan="2">股东设置</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td width="15%"><label for="day_separate_rate">股东分润</label></td>
                                    <td><label>商城每日利润的</label><input type="text" name="db[day_separate_rate]" class="u-ipt u-ipt-tiny" id="day_separate_rate" value="{$db.day_separate_rate ?: 0}" /><span>%，在 00:00 自动给股东分润</span></td>
                                </tr>
                                <tr>
                                    <td><label for="min_cash_money">最低提现金额</label></td>
                                    <td><input type="text" name="db[min_cash_money]" class="u-ipt u-ipt-tiny" id="min_cash_money" value="{$db.min_cash_money ?: 0}" /><span>元</span></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="m-tab-con dn">
                        <table class="m-table">
                            <thead>
                            <tr>
                                <th colspan="2">分销设置</th>
                            </tr>
                            </thead>
                            <tbody>
                            <!--<tr>-->
                                <!--<td width="15%"><label for="day_separate_rate">如何设置分销</label></td>-->
                                <!--<td><label>满多少金额成为分销商</label><input type="text" name="db[fx_money]" class="u-ipt u-ipt-tiny" id="day_separate_rate" value="{$db.fx_money ?: 0}" /><span>元</span></td>-->
                            <!--</tr>-->
                            <!--<tr>-->
                                <!--<td><label for="min_cash_money">设置分类成为分销商</label></td>-->
                                <!--<td>-->

                                    <!--<select name="db[fx_class]">-->

                                        <!--{foreach name="fx_list" item="item"}-->
                                        <!--<option value="{$item.id}"{if isset($db['fx_class']) and $db['fx_class'] eq $item['id']} selected{/if}>{$item.name}</option>-->
                                        <!--{/foreach}-->
                                    <!--</select>-->

                                <!--</td>-->
                            <!--</tr>-->
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊王需购买产品数量</label></td>
                                <td><input type="text" name="db[xw_num]" class="u-ipt u-ipt-tiny" id="xw_num" value="{$db.xw_num ?: 0}" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为大熊需购买产品数量</label></td>
                                <td><input type="text" name="db[dx_num]" class="u-ipt u-ipt-tiny" id="dx_num" value="{$db.dx_num ?: 0}" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为小熊需购买产品数量</label></td>
                                <td><input type="text" name="db[xx_num]" class="u-ipt u-ipt-tiny" id="xx_num" value="{$db.xx_num ?: 0}" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊宝需购买产品数量</label></td>
                                <td><input type="text" name="db[xb_num]" class="u-ipt u-ipt-tiny" id="xb_num" value="{$db.xb_num ?: 0}" /><span>箱</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊王需充值金额</label></td>
                                <td><input type="text" name="db[xw_money]" class="u-ipt u-ipt-tiny" id="xw_money" value="{$db.xw_money ?: 0}" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为大熊需充值金额</label></td>
                                <td><input type="text" name="db[dx_money]" class="u-ipt u-ipt-tiny" id="dx_money" value="{$db.dx_money ?: 0}" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为小熊需充值金额</label></td>
                                <td><input type="text" name="db[xx_money]" class="u-ipt u-ipt-tiny" id="xx_money" value="{$db.xx_money ?: 0}" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">成为熊宝需充值金额</label></td>
                                <td><input type="text" name="db[xb_money]" class="u-ipt u-ipt-tiny" id="xb_money" value="{$db.xb_money ?: 0}" /><span>元</span></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="day_separate_rate">不同等级显示的价格</label></td>
                                <td><input type="text" name="db[fx_bl]" class="u-ipt u-ipt-tiny" id="fx_bl" value="{$db.fx_bl ?: 0}" />
                                    <span>备注：顺序为 游客,熊宝,小熊,大熊,熊王 格式为 100,50,40,30,20 单位为 元</span></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>

                    <div class="m-form-btn"><input type="hidden" name="option_name" value="app_info" /><input type="hidden" name="id" value="1"><button id="j_btn" class="u-btn">确定提交</button></div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}